# python manage.py migrate && uvicorn app.asgi:application --host 0.0.0.0 --port 8000 --workers 10
# docker exec -it -uroot chat-django pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# docker exec -it -uroot chat-django pip install corsheaders -i https://pypi.tuna.tsinghua.edu.cn/simple
# docker exec -it -uroot chat-django python manage.py collectstatic
# docker exec -it -uroot chat-django python manage.py migrate
# docker exec -it -uroot chat-django pip install dotenv -i https://pypi.tuna.tsinghua.edu.cn/simple
# docker exec -it -uroot chat-django ls -l static
# docker exec -it -uroot chat-django ls -l static/css

# docker cp ./django/app/static chat-django:/home/app/django


# docker exec -it -uroot chat-django python manage.py createsuperuser

"""

docker-compose down nginx

重构nginx镜像（正在运行的nginx容器会自动重启）
docker-compose build nginx
docker-compose restart nginx

docker exec -it chat-nginx curl http://django:8000
docker exec -it chat-django curl http://127.0.0.1:8000
"""


"""
测试django路由是否正确
docker exec -it -uroot chat-django curl http://127.0.0.1:8000/chat/
测试nginx配置是否正确
docker exec -it -uroot chat-nginx curl http://127.0.0.1/chat/


# 重启django容器
docker exec -it -uroot chat-django python manage.py makemigrations
docker exec -it -uroot chat-django python manage.py migrate
docker compose restart django

# 查看实时日志
docker logs -f chat-django

# 检查容器内文件是否存在
docker exec -it -uroot chat-django ls -l /home/app/django/media/20240805095412.png

# 检查nginx容器内文件是否存在
docker exec -it -uroot chat-nginx ls -l /home/app/django/media/20240805095412.png

# 安装某一个python软件包
docker exec -it -uroot chat-django python -m pip install daphne -i https://pypi.tuna.tsinghua.edu.cn/simple

# 安装requirements.txt中的所有软件包
docker exec -it -uroot chat-django pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple



command: daphne -b 0.0.0.0 -p 8000 mysite.asgi:application
"""

